package com.cl;

import com.cl.util.ScannerClass;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class MyEventClassLoader implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("server start");
        //启动类
        ScannerClass.scanner(MyEventClassLoader.class);
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("server destory");
    }
}
